import axios from "../utils/http";

//获取banner
export class HomeApi {
  // 获取banner
  static getBanner(params: { distributionSite?: string } = {}) {
    // 默认1，商品为2
    const { distributionSite = "1" } = params;
    return axios.get("/home/banner", {
      params: {
        distributionSite,
      },
    });
  }

  // 获取新鲜好物
  static getNew() {
    return axios.get("/home/new");
  }

  // 获取人气推荐
  static getHot() {
    return axios.get("/home/hot");
  }

  static getGoods() {
    return axios.get("/home/goods");
  }
}
